<%@ page import="com.mastercard.labs.Budget" %>



<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'amount', 'error')} required">
	<label for="amount">
		<g:message code="budget.amount.label" default="Amount" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="amount" required="" value="${fieldValue(bean: budgetInstance, field: 'amount')}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'card', 'error')} required">
	<label for="card">
		<g:message code="budget.card.label" default="Card" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="card" name="card.id" from="${com.mastercard.labs.Card.list()}" optionKey="id" required="" value="${budgetInstance?.card?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'endDate', 'error')} required">
	<label for="endDate">
		<g:message code="budget.endDate.label" default="End Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="endDate" precision="day"  value="${budgetInstance?.endDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'startDate', 'error')} required">
	<label for="startDate">
		<g:message code="budget.startDate.label" default="Start Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="startDate" precision="day"  value="${budgetInstance?.startDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'type', 'error')} ">
	<label for="type">
		<g:message code="budget.type.label" default="Type" />
		
	</label>
	<g:textField name="type" value="${budgetInstance?.type}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: budgetInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="budget.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${com.mastercard.labs.User.list()}" optionKey="id" required="" value="${budgetInstance?.user?.id}" class="many-to-one"/>
</div>

